//
//  InviteDetailHeaderView.m
//  PCR
//
//  Created by shumei on 16/7/8.
//  Copyright © 2016年 shumei. All rights reserved.
//

#import "InviteDetailHeaderView.h"

@implementation InviteDetailHeaderView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/
-(instancetype)initWithFrame:(CGRect)frame withArray:(NSArray *)arr
{
    self = [super initWithFrame:frame];
    if (self)
    {
        self.backgroundColor = [UIColor whiteColor];
        self.nameArray = arr;
        [self creatSectionView];
    }
    return self;
}

-(void)creatSectionView
{
    for (int x = 0; x < 4; x ++)
    {
        UILabel * label = [[UILabel alloc]initWithFrame:CGRectMake(x * MainSCreen.width / 4, 0, MainSCreen.width / 4, self.frame.size.height)];
        label.text = self.nameArray[x];
        label.font = [UIFont systemFontOfSize:14.0];
        label.textAlignment = NSTextAlignmentCenter;
        [self addSubview:label];

    }
}

@end
